<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="http://libs.baidu.com/jquery/2.0.0/jquery.min.js"></script>
    <script src="http://cdn.highcharts.com.cn/highcharts/highcharts.js"></script>
</head>

<style>
    #container{margin: 0 auto;padding-top: 100px;}
</style>
<body>
<div  id="container" style="width: 700px;height: 500px;" ></div>
   <script>

       $.get("/demo/user/nnbl",function (backData) {
           //[{name,y}]
           showPie(backData.data)
       });
      function showPie(haha) {

          Highcharts.chart('container', {
              chart: {
                  plotBackgroundColor: null,
                  plotBorderWidth: null,
                  plotShadow: false,
                  type: 'pie'
              },
              title: {
                  text: '患者男女比例'
              },
              tooltip: {
                  pointFormat: '{series.name}: <b>{point.percentage:.1f}%</b>'
              },
              plotOptions: {
                  pie: {
                      allowPointSelect: true,
                      cursor: 'pointer',
                      dataLabels: {
                          enabled: false,

                      },
                      showInLegend:true
                  }
              },
              series: [{
                  name: 'Brands',
                  colorByPoint: true,
                  data:haha

              }]
          });
      }

   </script>
</body>


</html>